package com.etoak.service;

import com.etoak.common.core.vo.PageVO;
import com.etoak.entity.Ingredients;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author etoak
 * @since 2025-06-30
 */
public interface IngredientsService extends IService<Ingredients> {

    /**
     * 根据食材名称查询食材信息
     *
     * @param name
     * @return
     */
    Ingredients getByName(String name);


    /**
     * 添加食材信息
     *
     * @param ingredients
     */
    void add(Ingredients ingredients);


    List<Ingredients> getList(Ingredients ingredients);

    PageVO<Ingredients> listPage(int pageNumber, int pageSize, Ingredients ingredients);

    /**
     * 更新食材
     *
     * @param id          食材id
     * @param ingredients 更新参数
     */
    void update(int id, Ingredients ingredients);

    /**
     * 删除食材
     * @param id 食材id
     */
    void delete(int id);

    PageVO<Ingredients> listPage2(int pageNumber, int pageSize, Ingredients ingredients);



    List<Ingredients> getList2(Ingredients ingredients);
    PageVO<Ingredients> listPage3(int pageNumber, int pageSize, Ingredients ingredients);
}
